<?php
/*
+------------------------------------------------------------------------------+
|   EasyGallery - a plugin by nlstart
|
|	Plugin Support Site: e107.webstartinternet.com
|
|	For the e107 website system visit http://e107.org
|
|	Released under the terms and conditions of the
|	GNU General Public License (http://gnu.org).
+------------------------------------------------------------------------------+
*/
if( ! defined('e107_INIT')){ exit(); }
$eplug_folder = 'roster';
include_lan(e_PLUGIN.$eplug_folder.'/languages/'.e_LANGUAGE.'.php');

$eplug_name			= 'RS_NAME';
$eplug_version		= '1.0';
$eplug_author		= 'Francis Cheung';
$eplug_url			= 'http://plugins.e107.org/';
$eplug_email		= '';
$eplug_description	= RS_DESC;
$eplug_compatible	= 'e107v0.7+';
$eplug_compliant	= TRUE;
$eplug_readme		= 'readme.txt';

$eplug_menu_name	= RS_MENU;
$eplug_conffile		= 'admin_config.php';
$eplug_icon			= $eplug_folder.'/images/icon_easygallery_32.png';
$eplug_icon_small	= $eplug_folder.'/images/icon_easygallery_16.png';
$eplug_caption		= RS_CAPTION;

// List of preferences ---------------------------------------------------------
// this stores a default value(s) in the preferences. 0 = Off , 1= On
// Preferences are saved with plugin folder name as prefix to make preferences unique and recognisable
$eplug_prefs = array(
	);

// List of table names ---------------------------------------------------------
$eplug_sql = "-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 07, 2011 at 08:54 PM
-- Server version: 5.1.46
-- PHP Version: 5.3.3

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `pecdanie_ozs1`
--

-- --------------------------------------------------------

--
-- Table structure for table `ozs_activity_tbl`
--

CREATE TABLE IF NOT EXISTS `ozs_church_activity_tbl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`,`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=4 ;

--
-- Dumping data for table `ozs_activity_tbl`
--

INSERT INTO `ozs_activity_tbl` (`id`, `name`) VALUES
(1, '擘餅聚會'),
(2, '講道聚會'),
(3, '擘餅及講道聚會');

-- --------------------------------------------------------

--
-- Table structure for table `ozs_church_tbl`
--

CREATE TABLE IF NOT EXISTS `ozs_church_tbl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ref` (`id`,`type`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `ozs_church_tbl`
--

INSERT INTO `ozs_church_tbl` (`id`, `type`) VALUES
(1, '中文崇拜'),
(2, '英文崇拜');

-- --------------------------------------------------------

--
-- Table structure for table `ozs_church_user_tbl`
--

CREATE TABLE IF NOT EXISTS `ozs_church_user_tbl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `church_id` int(11) NOT NULL,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `ref` (`id`,`name`),
  UNIQUE KEY `id` (`id`,`church_id`,`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;

--
-- Dumping data for table `ozs_church_user_tbl`
--

INSERT INTO `ozs_church_user_tbl` (`id`, `church_id`, `name`) VALUES
(1, 1, '鍾創興'),
(2, 1, '陳國強');

-- --------------------------------------------------------

--
-- Table structure for table `ozs_job_tbl`
--

CREATE TABLE IF NOT EXISTS `ozs_church_job_tbl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `activity_id` int(11) NOT NULL,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`,`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=15 ;

--
-- Dumping data for table `ozs_job_tbl`
--

INSERT INTO `ozs_job_tbl` (`id`, `activity_id`, `name`) VALUES
(1, 1, '擘餅'),
(2, 1, '擘餅傳譯'),
(3, 1, '協助擘餅1'),
(4, 2, '講道'),
(5, 2, '講道傳譯'),
(6, 2, '主席'),
(7, 2, '主席傳譯'),
(8, 2, '風琴'),
(9, 3, '影視/音響'),
(10, 3, '當值執事'),
(11, 3, '司事'),
(12, 3, '司琴'),
(13, 1, '協助擘餅2'),
(14, 1, '協助擘餅3');

-- --------------------------------------------------------

--
-- Table structure for table `ozs_rooster_tbl`
--

CREATE TABLE IF NOT EXISTS `ozs_church_roster_tbl` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `church_id` int(11) NOT NULL,
  `job_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `job_date` date NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ref` (`id`,`church_id`,`user_id`,`job_date`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;

--
-- Dumping data for table `ozs_rooster_tbl`
--

INSERT INTO `ozs_roster_tbl` (`id`, `church_id`, `job_id`, `user_id`, `job_date`) VALUES
(4, 1, 1, 2, '2011-02-13'),
(5, 1, 2, 1, '2011-02-13');
";
	
// Create a link in main menu (yes=TRUE, no=FALSE) ---------------------------
$eplug_link			= TRUE;
$eplug_link_name	= RS_LINK_NAME;
$eplug_link_url		= e_PLUGIN.'roster/roster.php';
$eplug_done			= RS_DONE1.' '.EG_NAME.' v'.$eplug_version.' '.RS_DONE2;
// Set the gallery folder to CHMOD 777 and inform the user if it fails
if (!chmod(e_PLUGIN.'roster/roster.php', 0777)) 
{
  $eplug_done .= '<br />'.RS_CHMOD.'<br />';
}

// upgrading ...
$upgrade_add_prefs		= '';
$upgrade_remove_prefs	= '';
$upgrade_alter_tables	= '';
$eplug_upgrade_done		= RS_DONE3.' '.RS_NAME.' v'.$eplug_version.'.';
?>
